<?php

namespace common\models\merchant;

use common\traits\HasOneMerchant;
use Yii;

/**
 * This is the model class for table "{{%merchant_settle_account}}".
 *
 * @property int $id
 * @property int $merchant_id 店铺ID
 * @property string $serial_number 结算编号
 * @property string $product_pay_money 实付金额
 * @property string $refund_money 退款金额
 * @property string $merchant_money 企业金额
 * @property string $platform_money 平台金额
 * @property string $settlement_amount 结算金额
 * @property string $agent_money 代理商佣金
 * @property string $merchant_distribution_money 企业分销佣金
 * @property int $start_time 开始时间
 * @property int $end_time 结束时间
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class SettleAccount extends \common\models\base\BaseModel
{
    use HasOneMerchant;

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%merchant_settle_account}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['merchant_id', 'start_time', 'end_time', 'created_at', 'updated_at'], 'integer'],
            [['product_pay_money', 'refund_money', 'merchant_money', 'platform_money', 'settlement_amount', 'agent_money', 'merchant_distribution_money'], 'number'],
            [['serial_number'], 'string', 'max' => 50],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'merchant_id' => '店铺ID',
            'serial_number' => '结算编号',
            'product_pay_money' => '实付金额',
            'refund_money' => '退款金额',
            'merchant_money' => '企业金额',
            'platform_money' => '平台金额',
            'settlement_amount' => '结算金额',
            'agent_money' => '代理商佣金',
            'merchant_distribution_money' => '企业分销佣金',
            'start_time' => '开始时间',
            'end_time' => '结束时间',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
